﻿@using LanDBom.Models
@{
    ViewBag.Title = "SHjixs";
    Layout = "~/Views/Shared/_Genertals.cshtml";
}

<h4>报价单模版</h4>
<form class="row padtop col-12">
    <fieldset class="boun">
        <legend class="len">查询条件</legend>
        <div class="row">
            <p class="col">
                @Html.Label("报表分类：")
                @Html.TextBox("shen")
            </p>
            <p class="col">
                @Html.Label("客户名称：")
                @Html.TextBox("ming")
            </p>
            <p class="col-2">
                <input type="submit" value="查询" name="cha" class="btn-secondary btn-sm" />
            </p>
        </div>

    </fieldset>
</form>
<div>
    @Html.ActionLink("添加报价单模板", "SJINFlp", new { Controller = "Admin", Action = "SJINFlp" }, new { @class = "btn" })
</div>
<div class="baojia">
    <div style="display:none" id="txtdan">@(Session["JHNSHHD"])</div>
    @foreach (var item in ViewBag.shjjin as List<Sheji>)
    {
        <div class="baojiaL col-sm-3">
            <div class="">
                <h5 class="">@item.SJ_gs</h5>
                <p class="">@item.SJ_beizhu</p>
                <p style="display:none">@item.SJ_Dizhi</p>
                <span class="btn btn-primary" id="jisndllp">预览报表</span>
            </div>
        </div>
    }
</div>

@section scripts{
    <script src="~/Scripts/jquery-3.4.1.min.js"></script>
    <script src="~/Scripts/bootstrap.min.js"></script>
    <script>
        $(function () {
            $("#li14").css({ "color": "black", "background-color": "white" })
            $(document).on("click", "#jisndllp", function () {
                var bian = $("#txtdan").text()
                var dizhi = $(this).prev().text()
                console.log( bian)
                window.location.href = "/Admin/Print?Appbian=" + bian + "&path=" + encodeURIComponent(dizhi) ;
            })
        })
    </script>
}

